package com.xjtu.chapter06.ex6_2;

/**
 * @author yjq
 * @version 1.0
 * @date 2021/8/18 17:25
 */
public class Test {
    public static void main(String[] args) {
        Process process = new Process();
        try{
            process.Proc(0);//调用Proc
            process.Proc(1);
            process.Proc(2);
        }catch (ArithmeticException e){
            System.out.println("catch: "+ e+";Reason: "+e.getMessage());
        }catch (ArrayIndexOutOfBoundsException e){
            System.out.println("catch: "+ e+";Reason: "+e.getMessage());
        }catch (Exception e){
            System.out.println("Will not be executed");
        }finally {
            System.out.println("must go inside finally");
        }
    }
}
